package com.yh.handler;

import com.xxl.job.core.biz.model.ReturnT;
import com.xxl.job.core.handler.IJobHandler;
import com.xxl.job.core.handler.annotation.JobHandler;
import com.yh.service.IProductService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@JobHandler(value = "searchProductHandler")
@Component
public class SearchProductHandler extends IJobHandler {
    @Autowired
    private IProductService productService;

    @Override
    public ReturnT<String> execute(String s) throws Exception {
        productService.searchProduct();
        return ReturnT.SUCCESS;
    }
}
